import React from 'react'
import routes from '@/routes/index'
import store from './store'
import { Provider } from 'react-redux'
import { HashRouter, useRoutes } from 'react-router-dom'
import ErrorBoundary from './components/ErrorBoundary'
import '@/assets/css/tailwind.css'
import '@/assets/css/h5global.less'
import '@/assets/fonts/iconfont.css'
// import 'amfe-flexible'

export const App = (): React.ReactElement => {
  const RouteElement = () => useRoutes(routes)
  return (
    <ErrorBoundary>
      <Provider store={store}>
        <HashRouter>
          <RouteElement />
        </HashRouter>
      </Provider>
    </ErrorBoundary>
  )
}
